package org.pageley.games.domain.environment.pathfinding;

import org.pageley.games.domain.environment.Node;


public class ManhattanHeuristic implements DistanceHeuristic {

	@Override
	public double estimateDistance(Node from, Node to) {
		return Math.abs(to.getLocation().getX() - from.getLocation().getX()) 
		+ Math.abs(to.getLocation().getY() - from.getLocation().getY());
	} 
	
}
